<!-- /* Description for file.
 * 修改寻访人
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/resources
 * @since         ues
 * @version       V0.0.1
 * @modifiedby   会兵2011年0709
 * @lastmodified  会兵2011年0709
 */
 -->

<?php
echo $html->css ( 'jquery-validate/css/screen' );
echo $html->css ( 'tab' );
echo $html->css('start/jquery-ui-1.8.2.custom');
echo $javascript->link('jquery-ui-1.8.2.custom.min');
//echo $javascript->link ('formValidate');
?>
<script type="text/javascript">
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
	});
</script>

<script type="text/javascript">
var IND = IND1 = COM = '';
//验证是否必填
function test(id)
{
	var srt = "font#" + id;
	var isValidate =  $(srt).text();
	var validate = $.trim(isValidate);
	if(validate == "*"){
		return true;
	} else {
		return false;
	}
}

$(document).ready(function(){
	//检测重名按钮-----检测重名	
		$("#checkname").click(function(){
			if($("#VisitorrecordMobilePhone").val()!=""){
					if(verifyName()==false){
						alert("该候选人已存在，手机号码重复！");
						}
					else{
						alert("可以修改该候选人！");
					}
			}
		else{
				alert("请先输入手机号码");
			}
		});
});
//检测重名
function verifyName(){
	var shorName=$("#VisitorrecordMobilePhone").val();
	var param= [{name:"mobilePhone",value:shorName}];
	if(shorName!=""){
		flag=true;
		$.ajax({
			  type: 'POST',
			   url: "<?php echo ROOT_WEB_PATH; ?>/visitorrecords/sameName/",
			   async: false,
			   data: param,
			   dataType:"xml",
			   success: function(xml)
			   {
			  		$(xml).find("aaa").each(function(i){
			  			 var id = $(this).text();
						 if(id == "false")
						 {
							 flag=false;
							 return false;
						 };
			  		});
			   }
			 });
		return flag;
	}
	else {
	
	}
}
//添加验证
$(document).ready(function() {
	
	$.validator.setDefaults({       
		 submitHandler: function(form) { 
		if($("#VisitorrecordMobilePhone").val()!=""){
			if(verifyName()==false){
				alert("该寻访人已存在，手机号码重复！");
				}
			else{
				 form.submit();  
			}
		  }
		else	form.submit(); 
		}       
	});   
			
	$("#f1").validate({
		rules: {
		"data[Visitorrecord][competency]":{
		required: test("competency1"),selectNone:true
		},
		"data[Visitorrecord][industry]":{
		required: test("industry"),selectNone:true
		},
		"data[Visitorrecord][sex]":{
		required: test("sex"),selectNone:true
		},
		"data[Visitorrecord][workarea]":{
		required: test("workarea"),selectNone:true
		},
		"data[Visitorrecord][position]":{
		required: test("position"),selectNone:true
		},
		"data[Visitorrecord][previousCompany]":{
		required: test("previousCompany"),selectNone:true
		},
		"data[Visitorrecord][name]":{
		required: false,formatOfName:true,stringMinLength:0,stringMaxLength:100
		},
		"data[Visitorrecord][age]":{
			required: false,digits:true
			},
		"data[Visitorrecord][tel]":{
			required: test("tel"),phone:true
			},
		"data[Visitorrecord][email]":{
			required: false,email:true
			},
		"data[Visitorrecord][mobilePhone]":{
			required: false,mobile:true
			},
		"data[Visitorrecord][remindBefore]":{
			required: false,digits:true
			},
		"data[Visitorrecord][remindSpacing]":{
			required: false,digits:true
			},
		"data[Visitorrecord][acceptanceCause]":{
			required: false
			},
		"data[Visitorrecord][backgroundInquiry]":{
			required: false
			},
		"data[Visitorrecord][visitorMind]":{
			required: test("visitorMind")
			}
		},
//		messages:{
//			"data[Visitorrecord][tel]":{required: "请输入"}},
		focusInvalid:false,
		onkeyup:false,
		errorPlacement:function(error, element){error.appendTo(element.parent());}
			
	});
});
//验证结束

//行业二级菜单
$(document).ready(function(){
	$("#VisitorrecordIndustry1").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$("#VisitorrecordIndustry").val($("#VisitorrecordIndustry1 option:selected").text() + "_");
			$.post("<?php echo ROOT_WEB_PATH; ?>/industries/industriesQuery/",{
				Industry : $(this).val()
				},
			function(data,textStatus){
					 $("#VisitorrecordIndustry2:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#VisitorrecordIndustry2:eq(0)").append("<option></option>");
					 $("#VisitorrecordIndustry2:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
				});
				$.post("<?php echo ROOT_WEB_PATH; ?>/companymanages/getCompany/",{
				Industry : $("#VisitorrecordIndustry1 option:selected").text()
			},
			function(data,textStatus){
				$("#VisitorrecordPreviousCompany1:eq(0)>option").remove();
				$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
				$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val("").html("不限");
				$(data).find("aaa").each(function(){
					$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
					$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val($(this).text()).html($(this).text());
				});
			});
		}
		else
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/companymanages/getCompany/",{
				Industry : ''
			},
			function(data,textStatus){
				$("#VisitorrecordPreviousCompany1:eq(0)>option").remove();
				$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
				$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val("").html("不限");
				$(data).find("aaa").each(function(){
					$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
					$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val($(this).text()).html($(this).text());
				});
			});
			$("#VisitorrecordIndustry2:eq(0)>option").remove();
			$("#VisitorrecordIndustry2:eq(0)").append("<option></option>");
			$("#VisitorrecordIndustry2:eq(0)>option:last").val("").html("不选");
			$("#VisitorrecordIndustry").val("");
		}
	});
	$("#VisitorrecordIndustry2").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$("#VisitorrecordIndustry").val($("#VisitorrecordIndustry1 option:selected").text() + "_" + $("#VisitorrecordIndustry2 option:selected").text());
			$.post("<?php echo ROOT_WEB_PATH; ?>/companymanages/getCompany/",{
				Industry : $("#VisitorrecordIndustry2 option:selected").text()
			},
			function(data,textStatus){
				$("#VisitorrecordPreviousCompany1:eq(0)>option").remove();
				$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
				$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val("").html("不限");
				$(data).find("aaa").each(function(){
					$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
					$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val($(this).text()).html($(this).text());
				});
			});
		}
		else
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/companymanages/getCompany/",{
				Industry : $("#VisitorrecordIndustry1 option:selected").text()
			},
			function(data,textStatus){
				$("#VisitorrecordPreviousCompany1:eq(0)>option").remove();
				$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
				$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val("").html("不限");
				$(data).find("aaa").each(function(){
					$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
					$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val($(this).text()).html($(this).text());
				});
			});
			$("#VisitorrecordIndustry").val($("#VisitorrecordIndustry1 option:selected").text() + "_");
		}
	});
});

//职位二级菜单
$(document).ready(function(){
	$("#VisitorrecordPosition1").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$("#VisitorrecordPosition").val($("#VisitorrecordPosition1 option:selected").text() + "_");
			$.post("<?php echo ROOT_WEB_PATH; ?>/positions/getPosition/",{
				Position : $(this).val()
				},
			function(data,textStatus){
					 $("#VisitorrecordPosition2:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#VisitorrecordPosition2:eq(0)").append("<option></option>");
					 $("#VisitorrecordPosition2:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
				});
		}
		else
		{
			$("#VisitorrecordPosition2:eq(0)>option").remove();
			$("#VisitorrecordPosition2:eq(0)").append("<option></option>");
			$("#VisitorrecordPosition2:eq(0)>option:last").val("").html("不选");
			$("#VisitorrecordPosition").val("");
		}
	});
	$("#VisitorrecordPosition2").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$("#VisitorrecordPosition").val($("#VisitorrecordPosition1 option:selected").text() + "_" + $("#VisitorrecordPosition2 option:selected").text());
		}
		else
		{
			$("#VisitorrecordPosition").val($("#VisitorrecordPosition1 option:selected").text() + "_");
		}
	});
});

//职能二级菜单
$(document).ready(function(){
	$("#VisitorrecordCompetency1").change(function(){
		var CompetencyDroptoplist = $(this).val();
		if(CompetencyDroptoplist!="")
		{
			$("#VisitorrecordCompetency").val($("#VisitorrecordCompetency1 option:selected").text() + "_");
			$.post("<?php echo ROOT_WEB_PATH; ?>/competencies/getcompetencies/",{
				Competency : $(this).val()
				},function(data,textStatus){
					 $("#VisitorrecordCompetency2:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					 $("#VisitorrecordCompetency2:eq(0)").append("<option></option>");
					 $("#VisitorrecordCompetency2:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
				});
		}
		else
		{
			$("#VisitorrecordCompetency2:eq(0)>option").remove();
			$("#VisitorrecordCompetency2:eq(0)").append("<option></option>");
			$("#VisitorrecordCompetency2:eq(0)>option:last").val("").html("不选");
			$("#VisitorrecordCompetency").val("");
		}
	});
});

//职能三层字段 级联菜单 //
$(document).ready(function(){
	$("#VisitorrecordCompetency2").change(function(){
		var list = $(this).val();
		if(list!="")
		{
			$("#VisitorrecordCompetency").val($("#VisitorrecordCompetency1 option:selected").text() + "_" + $("#VisitorrecordCompetency2 option:selected").text() + "_");
			$.post("<?php echo ROOT_WEB_PATH; ?>/competencies/getcompetencies/",{
				Competency : $(this).val()
				},function(data,textStatus){
					 $("#VisitorrecordCompetency3:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#VisitorrecordCompetency3:eq(0)").append("<option></option>");
					 $("#VisitorrecordCompetency3:eq(0)>option:last").val($(this).attr("name")).html($(this).text());					 
				  });
				});
		}
		else
		{
			$("#VisitorrecordCompetency3:eq(0)>option").remove();
			$("#VisitorrecordCompetency3:eq(0)").append("<option></option>");
			$("#VisitorrecordCompetency3:eq(0)>option:last").val("").html("不选");
			$("#VisitorrecordCompetency").val($("#VisitorrecordCompetency1 option:selected").text() + "_");
		}
	});
	$("#VisitorrecordCompetency3").change(function(){
		var list = $(this).val();
		if(list!="")
		{
			if($("#VisitorrecordCompetency1 option:selected").text()!="不选"&&$("#VisitorrecordCompetency1 option:selected").text()!="不限")
			$("#VisitorrecordCompetency").val($("#VisitorrecordCompetency1 option:selected").text() + "_" + $("#VisitorrecordCompetency2 option:selected").text() + "_" + $("#VisitorrecordCompetency3 option:selected").text());
			else
			$("#VisitorrecordCompetency").val("");
		}
		else
		{
			if($("#VisitorrecordCompetency1 option:selected").text()!="不选"&&$("#VisitorrecordCompetency1 option:selected").text()!="不限")
			$("#VisitorrecordCompetency").val($("#VisitorrecordCompetency1 option:selected").text() + "_" + $("#VisitorrecordCompetency2 option:selected").text() + "_");
			else
			$("#VisitorrecordCompetency").val("");
		}
	});
});

//性别下拉
$(document).ready(function(){
	$("#VisitorrecordSex1").change(function(){
		var list = $(this).val();
		if(list!="")
		{
			$("#VisitorrecordSex").val($(this).val());
		}
		else
		{
			$("#VisitorrecordSex").val("");
		}
	});
	$("#VisitorrecordProfessional1").change(function(){
		var list = $(this).val();
		if(list!="")
		{
			$("#VisitorrecordProfessional").val($(this).val());
		}
		else
		{
			$("#VisitorrecordProfessional").val("");
		}
	});
	$("#VisitorrecordPreviousCompany1").change(function(){
		var list = $(this).val();
		if(list!="")
		{
			$("#VisitorrecordPreviousCompany").val($(this).val());
		}
		else
		{
			$("#VisitorrecordPreviousCompany").val("");
		}
	});
	$('#searchbutton').click(function(){
		var SC = $('#searchCompany').val();
		var NowIND = $("#VisitorrecordIndustry1 option:selected").val();
		var NowIND1 = $("#VisitorrecordIndustry2 option:selected").val();
		if(COM == ''){
			COM = getCOM();
		}
		if(IND!=NowIND || IND1!=NowIND1){
			IND = NowIND;
			IND1 = NowIND1;
			COM = getCOM();
		}
		if(COM=='')	return;
		var C_ary = COM.split('|#|');
		$("#VisitorrecordPreviousCompany1:eq(0)>option").remove();
		$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
		$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val("").html("不限");
		for(var i=0;i<C_ary.length;i++){
			var v = C_ary[i];
			if(v=='') continue;
			if(SC=='' || v.indexOf(SC.toUpperCase())!=-1 || v.indexOf(SC.toLowerCase())!=-1){
				$("#VisitorrecordPreviousCompany1:eq(0)").append("<option></option>");
				$("#VisitorrecordPreviousCompany1:eq(0)>option:last").val(v).html(v);
			}
		}
	});
	function getCOM(){
		var N_com = '';
		$('#VisitorrecordPreviousCompany1 option').each(function(){
			N_com += $(this).val()+"|#|";
		});
		return N_com;
	}
	$("#VisitorrecordResumerank1").change(function(){
		var list = $(this).val();
		if(list!="")
		{
			$("#VisitorrecordResumerank").val($(this).val());
		}
		else
		{
			$("#VisitorrecordResumerank").val("");
		}
	});
	$("#VisitorrecordVisitorstateId1").change(function(){
		var list = $(this).val();
		var color = $(this).find('option:selected').val();
		color = color.split("#");
		color = "#" + color[1];
		if(list!="")
		{
			$("#VisitorrecordVisitorstateId").val($("#VisitorrecordVisitorstateId1 option:selected").text());
		}
		else
		{
			$("#VisitorrecordVisitorstateId").val("");
		}
	});
	$("#close").click(function(){
		window.close();
	});
	
});
//省份城市
$(function(){
	//省份级联菜单 //
		$("#VisitorrecordProvinceId").change(function(){
			var workareaf = "" ;
			var list = $(this).val();
			$("#VisitorrecordWorkarea").val($("#VisitorrecordProvinceId option:selected").text() + '-');
			if(list!="")
			{
				$.post("<?php echo ROOT_WEB_PATH; ?>/cities/getProvince/",{
					provicnceid : $(this).val()
					},
				function(data,textStatus){
						 $("#VisitorrecordCityId:eq(0)>option").remove();
						 $(data).find("aaa").each(function(){
						// alert($(this).attr("name"));
						 $("#VisitorrecordCityId:eq(0)").append("<option></option>");
						 $("#VisitorrecordCityId:eq(0)>option:last").val($(this).attr("name")).html($(this).text());

					  });
					if($("#VisitorrecordCityId option:selected").html() != null){		  
							 workareaf = $("#VisitorrecordProvinceId option:selected").text() + '-' +$("#VisitorrecordCityId option:selected").html();
					}
					else{
						workareaf = $("#VisitorrecordProvinceId option:selected").text() + '-';
					}
					$("#VisitorrecordWorkarea").val(workareaf);
						  
				});
			}
		});
		$("#VisitorrecordCityId").change(function(){
			var citylist = $(this).val();
			if(citylist!="")
			{
				if($("#VisitorrecordProvinceId option:selected").text()!=""&&$("#VisitorrecordCityId option:selected").text()!="")
				$("#VisitorrecordWorkarea").val($("#VisitorrecordProvinceId option:selected").text() + "-" + $("#VisitorrecordCityId option:selected").text());
				else
				$("#VisitorrecordWorkarea").val("");
			}
			else
			{
				if($("#VisitorrecordProvinceId option:selected").text()!=""&&$("#VisitorrecordProvinceId option:selected").text()!="")
				$("#VisitorrecordWorkarea").val($("#VisitorrecordProvinceId option:selected").text() + "-");
				else
				$("#VisitorrecordWorkarea").val("");
			}
		});
});
</script>
<style>
.input{float:left;}
</style>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Visitor Management');//一级目录
										   echo '>';echo __('Visitorrecord');//一级目录
										   echo '>';echo __('Customer Managements Detail');//一级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Visitor Management Editvistor',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<div class="tabflex">
<?php echo $form->create('Visitorrecord',array('action'=>'update/'.$visitorrecord['Visitorrecord']['id'],'type'=> 'post','id'=>'f1','onsubmit'=>'return mycheck();'));?>
<fieldset><legend><?php __('Visitor Management Editvistor');//修改候选人?></legend>
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
	<?php echo $form->hidden('resumeid',array('value'=>$resume['Resume']['id']));?>
	<tr>
		<td></td>
		<td><?php __('当前行业');?>:
			<font color="red" id="industry">
				<?php if($fields['industry'] == 1 && $fields['industry'] !=null){echo "*";}?>
			</font>
		</td>		
		<td colspan="5"><?php echo $form->input('industry',array('label'=>false,'div'=>false,'value'=>$resume['Resume']['industry']));?>
		<?php $options = array();
					foreach($industrylist as $eachrecord)
					{
						$options[$eachrecord['Industry']['id']] = $eachrecord['Industry']['name'];
					}
					echo $form->input('industry1',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
				?>
		<?php
				echo $form->input('industry2',array('options'=>array('0'=>'不选'),'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
				?>
		</td>
	</tr>
	<tr>
		<td></td>
		<td><?php __('当前公司');?>:
					<font color="red" id="previousCompany">
				<?php if($fields['previousCompany'] == 1 && $fields['previousCompany'] !=null){echo "*";}?>
			</font>	
		</td>
		<td colspan="5"><?php echo $form->input('previousCompany',array('value' =>$resume['Resume']['nowCompany'],'div'=>false,'label'=>false));?>
		
		<?php $options = array();
					foreach($companymanagelist as $eachrecord)
					{
						$options[$eachrecord['Companymanage']['name']] = $eachrecord['Companymanage']['name'];
					}
					echo $form->input('previousCompany1',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
				?>
				<input type="text" id = 'searchCompany' style='width:80px;'>
		<input type="button" id="searchbutton" value="查">
		</td>
		</tr>
		<tr>
		<td ></td>
		<td><?php __('职能');?>:
					<font color="red" id="professional">
				<?php if($fields['professional'] == 1 && $fields['professional'] !=null){echo "*";}?>
			</font>	
		</td>	
		<td colspan="5"><?php echo $form->input('competency',array('label'=>false,'div'=>false,'value'=>$resume['Resume']['competency']));?>
		<!--职能下拉-->
		
		<?php $options = array();
					foreach($competencylist as $eachrecord)
					{
						$options[$eachrecord['Competency']['id']] = $eachrecord['Competency']['name'];
					}
					echo $form->input('competency1',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));
				?>

		<?php 
			echo $form->input('competency2',array('options'=>array('0'=>'不选'),'label'=>false,'div'=>false,'class'=>'TextBoxE1'));
		?>

		<?php 
			echo $form->input('competency3',array('options'=>array('0'=>'不选'),'label'=>false,'div'=>false,'class'=>'TextBoxE1'));
		?>
		</td>
		</tr>
		<tr>
		<td></td>
		<td><?php __('现在职位');?>:
			<font color="red" id="position">
				<?php if($fields['position'] == 1 && $fields['position'] !=null){echo "*";}?>
			</font>	
			</td>
		<td colspan="5"><?php echo $form->input('position',array('label'=>false,'div'=>false,'value'=>$resume['Resume']['position']));?>
		<!--现在职位下拉-->
		
		<?php $options = array();
					foreach($positionlist as $eachrecord)
					{
						$options[$eachrecord['Position']['id']] = $eachrecord['Position']['name'];
					}
					echo $form->input('position1',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));	
				?>
		<?php 
			echo $form->input('position2',array('options'=>array('0'=>'不选'),'label'=>false,'div'=>false,'class'=>'TextBoxE1'));
		?>
		</td>
		</tr>
	<tr>
		<td width="5%"></td>
		<td width="10%"><?php __('候选人姓名');?>:</td>
		<td width="20%">
		<?php 
				echo $form->input('name',array('label'=>false,'id'=>'resumesname','value'=>$resume['Resume']['name']));
			?>
		</td>
		<!--性别下拉-->
		<td width="10%"></td>
		<td width="5%"></td>
		<td width="10%"><?php __('性别');?>:
					<font color="red" id="sex">
				<?php if($fields['sex'] == 1 && $fields['sex'] !=null){echo "*";}?>
			</font>	
		</td>	
		<td width="40%"><?php echo $form->text('sex',array('label'=>false,'value'=>$resume['Resume']['sex']));?>
		<?php $options = array('' =>'未知','男' =>'男','女' =>'女');
					echo $form->input('sex1',array('options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
				?>
		</td>

	</tr>
	<tr>
		<td></td>
		<td ><?php __('生日');?>:</td>
		<td><span class="datepickerSpan">
		<?php 
		echo $form->text('birthday',array('label'=>false,'value'=>$resume['Resume']['birthday']));		
		?>
		</span>
		</td>
		<td></td>
		<td></td>
		<td><?php __('现工作地点');?>:
		<font color="red" id="workarea">
				<?php if($fields['workarea'] == 1 && $fields['workarea'] !=null){echo "*";}?>
			</font>	
		</td>	
		<td>
		<?php 
		echo $form->text('workarea', array('label'=>false,'value'=>$resume['Resume']['workarea'],'readOnly'=>true));
		$options = array();
		foreach($provinces as $eachrecord)
		{
			$options[$eachrecord['Province']['id']] = $eachrecord['Province']['name'];
		}
		echo $form->input('province_id',array('options'=>$options,'label'=>false,'div'=>false,'default'=>$provinceid));
		$options = array();
		foreach($cities as $eachrecord)
		{
			$options[$eachrecord['City']['id']] = $eachrecord['City']['name'];
		}
		echo $form->input('city_id',array('options'=>$options,'label'=>false,'div'=>false,'default'=>$cityid));
		?>	
		</td>

	</tr>
	<tr>
		<td ></td>
		<td ><?php __('年龄');?>:</td>
		<td>
		<?php
					echo $form->text('age',array('label'=>false,'value'=>$resume['Resume']['age']));
				?>
		</td>
		<td ></td>
		<td></td>
		<td ><?php __('学历');?>:</td>
		<td>
		<?php
					echo $form->text('professional',array('label'=>false,'value'=>$resume['Resume']['finishschool']));
				?>
		<?php $options = array();
					foreach($professionallist as $eachrecord)
					{
						$options[$eachrecord['Advanceddegreerank']['name']] = $eachrecord['Advanceddegreerank']['name'];
					}
					echo $form->input('professional1',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
				?>
		</td>

	</tr>
	<tr>
		<td ></td>
		<td ><?php __('工作电话');?>:
					<font color="red" id="tel">
				<?php if($fields['tel'] == 1 && $fields['tel'] !=null){echo "*";}?>
			</font>	
		</td>
		<td >
		<?php
					echo $form->input('tel',array('label'=>false,'value'=>$resume['Resume']['tel']));
				?>
		</td>
		<td></td>
		<td ></td>
		<td ><?php __('手机');?>:</td>
		<td>
		<?php 
					echo $form->input('mobilePhone',array('label'=>false,'value'=>$resume['Resume']['mobilePhone']));
				?>
				<?php echo "<input type='button' value='检测重复' class='btn4' id='checkname' ></input>"?>
		</td>
		
	</tr>
	<tr>
		<td></td>
		<td ><?php __('简历等级');?>:</td>
		<td colspan="2"><?php echo $form->input('resumerank',array('value' =>$resume['Resume']['resumerank'],'div'=>false,'label'=>false,'readOnly'=>'true'));?>
		<?php $options = array();
					foreach($resumeranklist as $eachrecord)
					{
						$options[$eachrecord['Resumerank']['name']] = $eachrecord['Resumerank']['name'];
					}
					echo $form->input('resumerank1',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
				?>
		</td>
		<td></td>
		<td><?php __('电子邮件');?>:</td>
		<td >
		<?php 
					echo $form->input('email',array('label'=>false,'value'=>$resume['Resume']['email']));
				?>
		</td>
	</tr>
	<tr>
			<td ></td>
			<td ><?php __('现工作开始时间');?>:</td>
			<td>		<span class="datepickerSpan">
				<?php 
						echo $form->input('startworkdate',array('label'=>false,'value'=>$visitorrecord['Resume']['startworkdate']));
				?>
				</span>
			</td>
			<td ></td>
			<td></td>
			<td ><?php __('状    态');?>:</td>
			<td>
				<?php 
						echo $form->text('visitorstate_id',array('label'=>false,'value'=>$visitorrecord['Visitorstate']['name'],'readOnly'=>'true'));
				?>
				<?php $options = array();
					foreach($visitorstatelist as $eachrecord)
					{
						$options[$eachrecord['Visitorstate']['id']] = $eachrecord['Visitorstate']['name'];
					}
					echo $form->input('visitorstate_id1',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
				?>
		</td>
	</tr>
		<tr>
			<td ></td>
			<td ><?php __('入选原因');?>:</td>
			<td colspan="5">
				<?php 
					echo $form->textarea('acceptanceCause',array('label'=>false,'class'=>'areaStyle','value'=>$visitorrecord['Visitor']['acceptanceCause']));
				?>
			</td>
		</tr>
		<tr>
			<td ></td>
			<td ><?php __('背景调查');?>:</td>
			<td colspan="5">
				<?php 
					echo $form->textarea('backgroundInquiry',array('label'=>false,'class'=>'areaStyle','value'=>$visitorrecord['Visitor']['backgroundInquiry']));
				?>
			</td>
		</tr>
		<tr>
			<td ></td>
			<td ><?php __('创建人');?>:</td>
			<td>
				<?php 
					echo $form->input('creater',array('label'=>false,'value'=>$visitorrecord['Visitorrecord']['creater'],'disabled'=>'disabled'));
				?>
			</td>
			<td></td>
			<td ></td>
			<td ><?php __('创建日期');?>:</td>
			<td>
				<?php 
					echo $form->text('created',array('label'=>false,'value'=>$visitorrecord['Visitorrecord']['created'],'disabled'=>'disabled'));
				?>
			</td>
		</tr>
		<tr>
			<td></td>
			<td colspan="6">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
				<tr>
					<td width="100px;"><a><?php __('第1次寻访记录');?>,</a></td>
					<td><a><?php __('寻访时间');?>,</a></td>
					<td>
					<?php 
					echo $form->text('visitorTime',array('label'=>false,'value'=>$visitorrecord['Visitorrecord']['visitorTime'],'disabled'=>'disabled'));
					?>
					</td>
					<td>
					<?php 
					echo $form->textarea('visitorMind',array('label'=>false,'class'=>'TextBoxH','value'=>$visitorrecord['Visitorrecord']['visitorMind']));
					?>
					</td>
				</tr>
			</table>
			</td>

		</tr>
</table>
</fieldset>
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100">
			<?php echo $form->button('确定修改',array('type'=>'submit','class'=>'btn4'));?>
		</td>
		<td width="100">
			<?php echo $form->button('关闭',array('id'=>'close','class'=>'btn2'));?>
		</td>
	</tr>
</table>

<?php echo $form->end();?>
</div>